x86: get rid of BOOT_TRAMPOLINE
authorJan Beulich <jbeulich@suse.com>
Mon, 11 Jun 2012 14:15:28 +0000 (15:15 +0100)
committerJan Beulich <jbeulich@suse.com>
Mon, 11 Jun 2012 14:15:28 +0000 (15:15 +0100)
commit46fce9fd2b3557c97e6ce9beec9ed17ad87d6f94
tree65e982332204cd38bd19dbef11cdd82e2db42c2b
parent035a14476e384494a9c70139dd1747d6e9fd448e
x86: get rid of BOOT_TRAMPOLINE

We recently saw a machine that has the EBDA extending as low as
0x7c000, so that Xen fails to boot after relocating the trampoline.
To fix this, I removed BOOT_TRAMPOLINE and bootsym_phys completely.

Here are the parts:

1) the trampoline segment is set to 64k below the EBDA.  head.S grows
the ability to relocate the trampoline segment

2) reloc.c is made position-independent.  It allocates data below the
trampoline, whose address is passed in _eax.

3) cmdline.S is called before relocating, so all bootsym_phys there
become sym_phys.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
jb: - fall back to low memory size (instead of segment 0x7c00) if EBDA
      value is out of range
    - also add upper limit check on EBDA value
    - fix and simplify inline assembly operands in reloc_mbi_struct()
    - use lret instead of retf
    - renamed early_stack to wakeup_stack, defined and used now only
      in wakeup.S
    - aligned reloc.bin's end of .text to 16 bytes, so that checking
      __bss_start == end works reliably

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/boot/Makefile
xen/arch/x86/boot/build32.mk
xen/arch/x86/boot/cmdline.S
xen/arch/x86/boot/head.S
xen/arch/x86/boot/reloc.c
xen/arch/x86/boot/trampoline.S
xen/arch/x86/boot/wakeup.S